package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum AccessControlStatus implements HashID {

    IN_FORCE("1", "生效中"),
    RECYCLED ("2", "已失效"),
    INVALID("3", "已回收"),
    ;


    private final String id;
    private final String desc ;

    public static AccessControlStatus get(String id) {
        AccessControlStatus[] accessControlStatusArr = values();
        for (AccessControlStatus accessControlStatus : accessControlStatusArr) {
            if (accessControlStatus.getId().equals(id)) {
                return accessControlStatus;
            }
        }
        return null;
    }

    private AccessControlStatus(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
